/*    
    BibleNotebook - A bible reader software
    Copyright (C) 2014  Williams Fernando Lopez

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
 */

package com.simplebible.bible.objects;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Williams Lopez
 */
public class Book extends BibleObject{

    protected List<Chapter> chapters;
    protected int chaptersCount;

    public Book(String abreviation, String human, int caps) {
        chaptersCount = caps;
        chapters = new ArrayList<Chapter>();
        setHumanName(human);
        setAbreviation(abreviation);
        for(int i=1;i<=caps;i++){
            Chapter c = new Chapter();
            c.setAbreviation(abreviation+"."+i);
            chapters.add(c);
        }
    }

    public Book(){
        
    }

    public List<Chapter> getChapters() {
        return chapters;
    }

    public void setChapters(List<Chapter> chapters) {
        this.chapters = chapters;
    }

    @Override
    public String toString() {
        return getHumanName();
    }

    public int getChaptersCount() {
        return chaptersCount;
    }

    public void setChaptersCount(int chaptersCount) {
        this.chaptersCount = chaptersCount;
    }


    
    









}
